package com.woniuxy.dr_mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.dr_mall.entity.DrSpecVal;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张哲轩
 * @since 2021-08-11
 */
public interface DrSpecValMapper extends BaseMapper<DrSpecVal> {

    /**
     * 根据规格id查询规格值
     *
     * @param specId 规格id
     * @return 规格值
     */
    @Select("select * from dr_spec_val where specId=#{specId}")
    List<DrSpecVal> getSpecValsBySpecId(int specId);


    //通过价格规格值的id查询，规格值的名称 叶官鑫 2021-8-18
    @Select("select specval from dr_spec_val where id=#{specId} ")
    String specidSelectSpecVal(int specId);
}
